﻿using System;
using System.IO;
using System.Net;
using System.Collections.Generic;
using System.Threading.Tasks;
using NFinal;

//此代码由NFinalCompiler生成。
//http://bbs.nfinal.com
namespace NFinalCompiler.SqlModel.NetStandard
{
    /// <summary>
    /// 模板类
    /// </summary>
    [View("/NFinalCompiler/SqlModel/NetStandard/EnumNew.cshtml")]
    public class EnumNewRazor : NFinal.View.RazorView<EnumModelData>
    {
        /// <summary>
        /// 模板类初始化函数
        /// </summary>
        /// <param name="writer">写对象</param>
        /// <param name="Model">数据</param>
        public EnumNewRazor(NFinal.IO.Writer writer, EnumModelData Model) : base(writer, Model)
        {
        }
        
        /// <summary>
        /// 输出模板内容
        /// </summary>
        public override void Execute()
        {
            this.ExecuteAsync().Wait();
        }
        /// <summary>
        /// 输出模板内容(异步)
        /// </summary>
        public override async Task ExecuteAsync()
        {
            await writer.WriteAsync("");
            await writer.WriteAsync("using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace ");
            await writer.WriteAsync(Model.NameSpace);
            await writer.WriteAsync("\r\n{\r\n");
            await writer.WriteAsync(Model.SystemEnumInfo.Definition);
            await writer.WriteAsync("\r\n}");
        }
    }
}
